package com.cz.nongyetongv5.utils;

import android.content.Context;
import android.view.View;
import android.view.View.OnClickListener;

import com.cz.nongyetongv5.R;
import com.cz.nongyetongv5.custom.dialog.CustomDialog;

public class DialogUtil {


	/**
	 * 弹出信息框
	 */
	public static CustomDialog showMessageDialog (String message,OnClickListener onClickListener,Context context){

		final CustomDialog messageDialog = new CustomDialog(context) ;
		messageDialog.setMessage(message) ;

		if (onClickListener == null){
			onClickListener = new OnClickListener() {

				@Override
				public void onClick(View v) {
					messageDialog.dismiss() ;
				}
			} ;
		}

		messageDialog.setOnActionClickListener(onClickListener) ;

		messageDialog.setActionTxt(context.getResources().getString(R.string.jiandujiancha_btn_sureitem));

		messageDialog.show() ;

		return messageDialog ;

	}
}
